import 'package:json_annotation/json_annotation.dart';

part 'base_entity.g.dart';

@JsonSerializable()
class BaseEntity {
  final String? id;
  final DateTime? created;
  final DateTime? updated;
  final bool? deleted;

  BaseEntity({
    this.id,
    this.created,
    this.updated,
    this.deleted,
  });

  factory BaseEntity.fromJson(Map<String, dynamic> json) =>
      _$BaseEntityFromJson(json);

  Map<String, dynamic> toJson() => _$BaseEntityToJson(this);
}
